package com.example.spareparts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.spareparts.entity.Supplier;
import com.example.spareparts.repository.SupplierRepository;


import java.util.List;
@Service
public class SupplierService {
    @Autowired
    private SupplierRepository supplierRepository;
    public List<Supplier> findAllSupplier(){return supplierRepository.findAllSupplier();}
    public void insertSupplier(Supplier supplier){supplierRepository.insertSupplier(supplier);}
    public void updateSupplier(Supplier supplier){supplierRepository.updateSupplier(supplier);}
    public void deleteSupplier(Long supplierid){supplierRepository.deleteSupplier(supplierid);}

    public Supplier findSupplierById(Long supplierid){return supplierRepository.findSupplierById(supplierid);}
}
